﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="CaoZuoYuan.ascx.cs" Inherits="webUserControl_CaoZuoYuan" %>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
    ConnectionString="<%$ ConnectionStrings:LinFen %>" 
    DeleteCommand="DELETE FROM [AdminInfo] WHERE [ID] = @ID" 
    InsertCommand="INSERT INTO [AdminInfo] ([AdminName], [AdminPassWD]) VALUES (@AdminName, @AdminPassWD)" 
    SelectCommand="SELECT [ID], [AdminName], [AdminPassWD] FROM [AdminInfo] WHERE (([CityID] = @CityID) AND ([isType] = @isType))" 
    UpdateCommand="UPDATE [AdminInfo] SET [AdminName] = @AdminName, [AdminPassWD] = @AdminPassWD WHERE [ID] = @ID">
    <SelectParameters>
        <asp:CookieParameter CookieName="cCityID" Name="CityID" Type="Int32" />
        <asp:Parameter DefaultValue="3" Name="isType" Type="Int32" />
    </SelectParameters>
    <DeleteParameters>
        <asp:Parameter Name="ID" Type="Int32" />
    </DeleteParameters>
    <UpdateParameters>
        <asp:Parameter Name="AdminName" Type="String" />
        <asp:Parameter Name="AdminPassWD" Type="String" />
        <asp:Parameter Name="ID" Type="Int32" />
    </UpdateParameters>
    <InsertParameters>
        <asp:Parameter Name="AdminName" Type="String" />
        <asp:Parameter Name="AdminPassWD" Type="String" />
    </InsertParameters>
</asp:SqlDataSource>
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
    AllowSorting="True" AutoGenerateColumns="False" BackColor="White" 
    BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px" CellPadding="3" 
    DataKeyNames="ID" DataSourceID="SqlDataSource1" Font-Size="12px" 
    GridLines="Horizontal" HorizontalAlign="Center" Width="100%">
    <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
    <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Center" />
    <Columns>
        <asp:BoundField DataField="ID" HeaderText="编号" InsertVisible="False" 
            ReadOnly="True" SortExpression="ID" />
        <asp:TemplateField HeaderText="操作员登录名" SortExpression="AdminName">
            <EditItemTemplate>
                <asp:TextBox ID="TextBox1" runat="server" Enabled="False" 
                    Text='<%# Bind("AdminName") %>'></asp:TextBox>
            </EditItemTemplate>
            <ItemTemplate>
                <asp:Label ID="Label1" runat="server" Text='<%# Bind("AdminName") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:BoundField DataField="AdminPassWD" HeaderText="密码" 
            SortExpression="AdminPassWD" />
        <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
    </Columns>
    <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
    <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
    <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
    <AlternatingRowStyle BackColor="#F7F7F7" />
</asp:GridView>
